﻿using System.Collections.Generic;
using NHunspell;

namespace ku.silbentrenner
{
    public static class NHAdapter
    {
        public static IEnumerable<string> Silben(this string wort )
        {
            return WortMitTrennzeichen(wort).Split('=');
        }

        private static string WortMitTrennzeichen(string wort)
        {
            using (Hyphen hyphen = new Hyphen(@"hyph_de_DE.dic"))
            {
                return hyphen.Hyphenate(wort).HyphenatedWord;
            }
        }
    }
}
